<?php
$username = $_POST['username'];
$password = $_POST['password'];
$passencryption = base64_encode($password);
if($status_connect){
	$sql = "select * from manager where user='$username'";
	$num = $db->num($sql);
	if($num == 0){
		echo "ไม่พบผู้ใช้";
	}else{
		$arr = $db->query($sql);
		foreach($arr as $ar){
			if($ar[2]==$passencryption){
				echo "login success";
			}else{
				echo "password error";
			}
		}
	}
}else{
	echo "db error";
}
?>